package com.huidatech.mpgdemo.util;

import java.net.InetAddress;

/**
 * @Description:
 * @Author: Wangzz
 * @Version: 1.0.0
 * @CreateDate: Created in 2021/10/23 22:51
 * @UpdateDate: [dateFormat:YYYY-MM-DD][modifier][description]
 */
public class CommonUtil {

    public static String getHostAndAddress(){
        String res = "";
        try{
            InetAddress localHost = InetAddress.getLocalHost();
            res = localHost.getHostAddress() + " - " + localHost.getHostName();
        }catch(Exception e){
            e.printStackTrace();
        }
        return res;
    }
}
